package com.corejava.training.inheritence;

public class Car {

	private int year;
	private String owner;
	private int speed;
	
	// no arg constructor
	public Car(){}
	
	// constructor with args
	
	public Car(int year, String owner){
		System.out.println("from constructor with args " );
	}

	// getters, setters
	public int getYear() {
		return year;
	}

	public void setYear(int year) {
		this.year = year;
	}

	public String getOwner() {
		return owner;
	}

	public void setOwner(String owner) {
		this.owner = owner;
	}
	
	public int getSpeed() {
		return speed;
	}

	public void setSpeed(int speed) {
		this.speed = speed;
	}

	// Car class method
	public void maxSpeed(){
	System.out.println("the max speed is " );	
	}
	
} // end of class








